﻿using System.Data.Entity.ModelConfiguration.Conventions;

namespace EntityFramework6.Services.CustomConventions
{
    /// <summary>
    /// All decimal columns has precison of 18 and scale of 2 e.g 1000000000000000.00
    /// </summary>
    public class DecimalConvention : Convention
    {
        public DecimalConvention()
        {
            this.Properties<decimal>().Configure(c=> c.HasPrecision(18, 2));
        }
    }
}
